<meta http-equiv="content-type" charset="UTF-8">
<link rel="stylesheet" href="<?php echo TEMPLATES_PATH; ?>/promotions/pt-style.css"/>
<header class="layout head padding-small">
    <a href="javascript:pageBack();" class="hBack float-left"></a>
    <h4 class="hTxt float-left text-center text-white"><?php echo $output['html_title']?></h4>
    <a href="javascript:;" id="btnJdkey" class="hHlep float-right"></a>
</header>

<div class="base-wp">
    <?php if(isset($output['one_adv'])){?>
    <div class="ad2 ad2-v1">
        <div class="ad2-big-img" style="padding-bottom: 0px;">
            <a href="<?php echo $output['one_adv']['info']['adv_pic_url']?>"><img src="/upload/adv/<?php echo $output['one_adv']['info']['adv_pic']?>" class="full-img" width=320></a>
        </div>
    </div>
    <?php }?>
    <?php if(isset($output['two_adv'])){?>
    <div class="ad2 ad2-v1">
        <div class="ad2-big-img">
            <a href="<?php echo $output['two_adv']['info']['adv_pic_url']?>"><img src="/upload/adv/<?php echo $output['two_adv']['info']['adv_pic']?>" class="full-img" width=320></a>
        </div>
    </div>
    <?php }?>
    <!--广告部分 Start-->
<!--    <div id="pt-banner">
        <div class="pt-banner-btm">
            <div class="pt-banner-bl hw31"><a href="http://www.d1mcw.com/index.php?act=advclick&amp;op=advclick&amp;adv_id=119&amp;ap_class=0" target="_blank"><img style="width:394px;height:156px" border="0" src="http://www.d1mcw.com/upload/adv/2a47171d2a24b776a6ee8790f471e508.jpg" alt="促销专区下1"></a></div>
            <div class="pt-banner-bm hw31"><a href="http://www.d1mcw.com/index.php?act=advclick&amp;op=advclick&amp;adv_id=120&amp;ap_class=0" target="_blank"><img style="width:394px;height:156px" border="0" src="http://www.d1mcw.com/upload/adv/d3dca07e6ff6de182cd55b188097025d.jpg" alt="促销专区下2"></a></div>
            <div class="pt-banner-br hw31"><a href="http://www.d1mcw.com/index.php?act=advclick&amp;op=advclick&amp;adv_id=121&amp;ap_class=0" target="_blank"><img style="width:394px;height:156px" border="0" src="http://www.d1mcw.com/upload/adv/92ceaf5b0006a6636e604ef167bd82f1.jpg" alt="促销专区下3"></a></div>
        </div>
        <div style="clear: both;"></div>
    </div>-->
    <!--广告部分 End-->
    <?php if(is_array($output['promotions_group'])&&count($output['promotions_group'])>0)
    foreach($output['promotions_group'] as $k=>$v){if($k==PROMOTIONS_GIVE&&$_GET['promotions_type_id']==PROMOTIONS_MR)continue;?>
        <div class="widget">
        <div class="clearfix widgets-hd"><span
                class="pull-left text-title J_Top"><?php echo $v;?></span><a
                href="index.php?act=Promotions&op=list&promotions_type_id=<?php echo $output['promotions_type_id'];?>&promotions_group_id=<?php echo $k;?>" class="pull-right">查看全部</a></div>
    </div>
    <?php if(is_array($output['promotions'][$k])&&count($output['promotions'][$k])>0)
            foreach($output['promotions'][$k] as $i=>$j){
                ?>
                <div class="widget goods com-wgt" >
            <div class="com-wp" <?php if($i==(count($output['promotions'][$k])-1))echo 'style="border-bottom:0px;"'?>>
                <div class="clearfix com-cnt">
                    <div class="com-pic"><a href="<?php echo ncUrl(array('act'=>'goods','goods_id'=>$j['goods_id']), 'goods');?>"><img
                            alt="" style="width:7rem;height:7rem" class=""
                            src="<?php echo thumb($j,'small');?>"></a>
                    </div>
                    <div class="com-info clearfix">
                        <div class="com-title"><a href="<?php echo ncUrl(array('act'=>'goods','goods_id'=>$j['goods_id']), 'goods');?>"><?php echo $j['goods_name'] ?></a></div>
                        <div class="origin-price">
                            <?php if($k==PROMOTIONS_BEST){
                                echo '畅销价';
                            }else{
                                echo '美财价';
                            }
                            ?><i class="yen">¥</i><i class="money"><?php if ($_SESSION['is_login'] == '1') {
                    echo $j['goods_store_price'];
                } else {
                                    echo '<a href="index.php?act=login">请登录</a>';
                                } ?></i></div>
                        <?php if($k==PROMOTIONS_SPECIAL){?>
                        <span class="origin-price">特价<i class="yen">¥</i><i class="money"><?php if ($_SESSION['is_login'] == '1') {
                                    if($j['xianshi_flag']==1&&$j['xianshi_discount']!='0.00'){
                                        echo ncPriceFormat($j['goods_store_price']*($j['xianshi_discount']/10));
                                    }else{
                                        echo $j['goods_store_price'];
                                    }
                                } else {
                                    echo '<a href="index.php?act=login">请登录</a>';
                                } ?></i></span><?php }?>
                        <?php if($_GET['promotions_type_id']==PROMOTIONS_MF&&$k==PROMOTIONS_GIVE){?>
                            <span class="origin-price">买一送一</span><?php }?>
                        <a href="<?php echo ncUrl(array('act'=>'goods','goods_id'=>$j['goods_id']), 'goods');?>" class="sale-stat sale-count">立即抢购</a>
                    </div>
                </div>
            </div>
        </div>
         <?php   } }
    ?>
</div>